/**
 * Copyright 2013 Viettel Telecom. All rights reserved.
 * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.viettel.junit4;

import java.util.ArrayList;
import java.util.List;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.viettel.core.bussiness.report.ReportUserMgr;
import com.viettel.core.common.utils.KPaging;
import com.viettel.core.dao.report.ReportServiceDAO;
import com.viettel.core.dao.report.ReportUserDAO;
import com.viettel.core.entities.report.ReportUserTextDaily;
import com.viettel.core.entities.report.vo.ReportServiceFilter;
import com.viettel.core.entities.report.vo.ReportServiceVO;
import com.viettel.core.entities.report.vo.ReportUserFilter;
import com.viettel.core.entities.report.vo.ReportUserVO;

//import com.viettel.core.dao.UsersDAO;

/**
 *  Mo ta muc dich cua lop (interface)
 *  @author: ToanTM1
 *  @version: 1.0
 *  @since: 1.0
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "/spring/applicationContext.xml" })
public class ReportService {

	
	@Autowired
	ReportServiceDAO reportServiceDAO;
	
	@Test
	public void getReportService() {		
		try {		
			ReportServiceFilter filter=new ReportServiceFilter();
			List<ReportServiceVO> list=new ArrayList<ReportServiceVO>();
			KPaging<ReportServiceVO> paging=new KPaging<ReportServiceVO> ();
			paging.setPage(0);
			paging.setPageSize(20);
			filter.setPaging(paging);
			
			list=reportServiceDAO.getListReportService(filter);
			System.out.println("ServiceType                            Nhom                            Dich vu                    Mo ta                  Trang thai");
			for (ReportServiceVO vo : list) {
				System.out.println(vo.getServiceType() +"         "+vo.getGroupName()+"         "+vo.getServiceName()+"         "+vo.getDescription()+"         "+vo.getServiceStatus());
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}	
}

